//对于axois进行二次封装
import axios from "axios";
//引入进度条



//实例axois
const requests = axios.create({
    baseURL: "/api",
    timeout: 5000,
})

//请求拦截器
requests.interceptors.request.use((config) => {


    return config;
})

//相应的拦截器
requests.interceptors.response.use((res) => {

    console.log(res)
    return res;
}, (error) => {
    return Promise.reject(new Error("faile"));
})


export default axios;